﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using personalplaner.common.mvvm.common;
using personalplaner.business;
using personalplaner.plugins.plananalysis.viewmodels;

namespace personalplaner.plugins.plananalysis
{
	/// <summary>
	/// Interaction logic for PrintView.xaml
	/// </summary>
	public partial class PrintView : UserControl
	{
		public PrintView()
		{
			InitializeComponent();
		}

		private void UserControlLoaded(object sender, RoutedEventArgs e)
		{
			var mw = ServiceLocator.GetGlobalService<IMainWindowDisplayContainer>();
			mw.IsWaitVisible = false;
		}

		public IEnumerable<UIElement> Pages
		{
			get
			{
				var dc = DataContext as PrintViewModel;
				if (dc == null)
					return null;

				return dc.Pages;
			}
			set
			{
				var dc = DataContext as PrintViewModel;
				if (dc == null)
					return;

				dc.Pages = value;
			}
		}
	}
}
